package com.wargameproject;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {
	/** Called when the activity is first created. */

	Button b1;
	Button b2;
	Button b3;
	Button b4;
	Button b5;
	Button b6;

	public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.ecran_d_accueil);

		b1 = (Button) findViewById(R.id.button1);
		b1.setOnClickListener(this);
		b2 = (Button) findViewById(R.id.button2);
		b2.setOnClickListener(this);
		b3 = (Button) findViewById(R.id.button3);
		b3.setOnClickListener(this);
		b4 = (Button) findViewById(R.id.button4);
		b4.setOnClickListener(this);
		b5 = (Button) findViewById(R.id.button5);
		b5.setOnClickListener(this);
		b6 = (Button) findViewById(R.id.button6);
		b6.setOnClickListener(this);

}

	public void onClick(View v) {

		switch (v.getId()) {
		case R.id.button1:
			Intent intent1 = new Intent(MainActivity.this,
					DemarrerUnePartie.class);
			startActivity(intent1);
			break;
		case R.id.button2:
			Intent intent2 = new Intent(MainActivity.this,
					Options.class);
			startActivity(intent2);
			break;
		case R.id.button3:
			Intent intent3 = new Intent(MainActivity.this,
					Aide.class);
			startActivity(intent3);
			break;
		case R.id.button4:
			Intent intent4 = new Intent(MainActivity.this,
					Statistiques.class);
			startActivity(intent4);
			break;
		case R.id.button5:
			Intent intent5 = new Intent(MainActivity.this,
					EnSavoirPlus.class);
			startActivity(intent5);
			break;
		case R.id.button6:
			Intent intent6 = new Intent(MainActivity.this,
					QuitterLeJeu.class);
			startActivity(intent6);
			break;

		default:
			break;
		}

	}

}
